package com.itzhoun.wayFactory;

import com.itzhoun.CheesePizza;
import com.itzhoun.GreakPizza;
import com.itzhoun.PepperPizza;
import com.itzhoun.Pizza;

/**
 * @author 周楠
 * @Date 2023/01/12/上午 10:25
 */
public class BeiJinPizza extends OrderPizza{

    @Override
    Pizza createPizza(String type) {
        Pizza pizza = null;
        switch (type){
            case "cheese" : pizza = new CheesePizza(); break;
            case "greek" : pizza = new GreakPizza(); break;
            case "pepper" : pizza = new PepperPizza(); break;
            default: return null;
        }
        return pizza;
    }
}
